@Inject('$http')
class ProcessTableService {

  // 流程列表
  queryFlowNode(param) {
    return this.$http.post('/api/workFlow/flowNodeList/query', param);
  }

  // 待办列表
  queryList(param) {
    return this.$http.post('/api/workFlow/workItemList/query', param);
  }

  // 执行流程
  queryFind(param) {
    return this.$http.post('/api/workFlow/flow/action', param);
  }

  // 流转记录
  queryConfirmList(param) {
    return this.$http.post('/api/workFlow/confirmList/query', param);
  }

  // 获取流程步骤
  getFlow(flowKey) {
    return this.$http({
      url: '/api/workFlow/flowNodeList/getByFlowKey',
      method: 'GET',
      params: { flowKey },
    });
  }

  // 新增监理审查意见表
  add(param) {
    return this.$http.post('/api/v1/safetyTable/ad17/add', param);
  }

  // 更新监理审查意见表
  update(param) {
    return this.$http.post('/api/v1/safetyTable/ad17/update', param);
  }

  get(id) {
    return this.$http({
      url: '/api/v1/safetyTable/ad17/findOne',
      method: 'GET',
      params: { id },
    });
  }

}

export default ProcessTableService;
